package jf.jufanzhibo.view.home.moder;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import jf.jufanzhibo.view.home.view.HomeFragment;


public class pageadapter extends FragmentPagerAdapter {

    public final int COUNT = 3;
    private String[] titles = new String[]{"关注", "热门", "最新"};
    private Context context;

    public pageadapter(FragmentManager fm, Context context) {
        super(fm);
        this.context = context;
    }

    @Override
    public Fragment getItem(int position) {
        return HomeFragment.newInstance(position + 1);
    }

    @Override
    public int getCount() {
        return COUNT;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
